Repository navigation
Add per-repo GitHub Actions ECR push roles (back-end, pybot) - #201
Conversation
One role per repo (back-end, pybot), each trusting only that repo's ecr-main and ecr-approval environment subjects, with an inline policy limited to that repo's ECR repository. The OIDC provider and ECR repositories are referenced by data source. The old shared role stays outside Terraform and is deleted once by CLI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🟢 All clear: Claude of Duty review passedMission: Review the code. Protect the branch. Deploy the future. Tip No findings. This review found no reason to block. Nothing to do for this review.
Run 45237956417, attempt 1 for head Claude of Duty never approves a PR. A human reviewer gives the final approval. 📋 Full review record: reasons, checks, signals, finding details, model summaries, token usageReviewed snapshot
Reasons the gate failed None. No reason applies. Checks (code, no model)
Signals (context only, never block) None. Dependency changes None. Finding details
Blocking is decided by code from category and severity, never by the model. A finding in a blocking category blocks only at high or critical severity. No findings. All three passes completed. Model summaries
Token usage
|
Why
Back-end and pybot CI push Docker images with one shared, hand-made role,
GitHubActions-ECR-Push. Its trust accepts any workflow in either repo, including same-repo PRs, and it can push to both ECR repos. This PR adds one role per repo, managed in Terraform, so that only maintainer-gated GitHub environments can push.Related: OperationCode/back-end#423, OperationCode/operationcode-pybot#471.
What changes
terraform/github_actions_ecr.tfadds:GitHubActions-ECR-Push-back-endandGitHubActions-ECR-Push-pybot.StringEqualsonaudand on exactly two immutable subjects per repo:...:environment:ecr-mainand...:environment:ecr-approval.ecr:GetAuthorizationTokenon*.The old shared role is not added to Terraform. A one-time CLI step deletes it after both repos have moved.
Plan
Plan: 4 to add, 0 to change, 0 to destroy.Review
A security review checked the rendered JSON against the reviewed design, the IDs through
gh api, and found no committed tfvars. There are no Critical or Important findings.After apply
In each repo, set
AWS_ROLE_ARNto the new role ARN. Then merge #423 and #471.🤖 Generated with Claude Code